home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
boot
/
czesc_2
/
wiconify
/
wiconsetter.lzh
/
wIconSetter
/
Source
/
wMemory.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-19
|
371b
|
15 lines
/*
* Helpfull macros for memory allocation
*/
#include <exec/memory.h>
#define MEMFLAGS MEMF_CLEAR
#define NEWSTRUCT(s,p) (p=(struct s *)AllocMem(sizeof(struct s),MEMFLAGS))
#define FREESTRUCT(s,p) (FreeMem(p,sizeof(struct s)))
#define NEWCHAR(p,n) (p=(char *)AllocMem(n+1,MEMFLAGS))
#define FREECHAR(p) (FreeMem(p,strlen(p)+1))
extern APTR AllocMem();